package com.xiaoman.read.config;

import com.xiaoman.read.readui.ReadUI;
import java.awt.image.BufferedImage;
import java.util.List;
import java.util.Map;

public class Config {
    public static List<Chapter> chapters;
    public static Map<Integer, List<BufferedImage>> pageImages; // 添加页面图像字段
    public static Map<String, BufferedImage> images;
    private static int currentChapterIndex;
    private static String fileType;

    public static final ReadUI readUI = new ReadUI();

    public static void setCurrentChapterIndex(int index) {
        currentChapterIndex = index;
    }

    public static int getCurrentChapterIndex() {
        return currentChapterIndex;
    }

    public static void setFileType(String type) {
        fileType = type;
    }

    public static String getFileType() {
        return fileType;
    }

    public static void removeAll() {
        chapters = null;
        pageImages = null;
        images = null;
        currentChapterIndex = 0;
        fileType = null;
    }
}
